home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Graphics / ImageFX / SaveBufferTIFF / Rexx / AutoFX / SaveBufferAs_TIFF.ifx.pre < prev    next >
Encoding:
Text File  |  1999-03-13  |  1.2 KB  |  52 lines

  1. /*
  2.  * $VER: SaveBufferAs_TIFF.ifx.pre
  3.  * Modified by dhomas trenn (01 Mar 1999)
  4.  * -> Modified to support TIFF images
  5.  *
  6.  * Copyright © 1992-1996 Nova Design, Inc.
  7.  * Written by Thomas Krehbiel
  8.  *
  9.  * Save main buffer as ILBM.
  10.  *
  11.  * Inputs:
  12.  *    Word(Arg(1),1) = Sequence number (?)
  13.  *    Word(Arg(1),2) = Total number of frames (N)
  14.  *
  15.  * Returns:
  16.  *    0 if successful, non-zero on failure
  17.  *
  18.  */
  19.  
  20. options results
  21.  
  22. base = 'Autofx_SaveBufferAsTIFF_'
  23. seq  = word(arg(1),1)
  24.  
  25. lastpath = getclip(base'Path'seq)
  26. lastext  = getclip(base'Ext'seq)
  27. lzw = getclip(base'LZW'seq)
  28.  
  29. if lzw = "" then lzw = "0"
  30. if lastext = "" & lastpath = "" then lastext = ".tif"
  31.  
  32. if lastpath = "" then do
  33.     GetPrefs SavePath
  34.     lastpath = result
  35. end
  36.  
  37. Gadget.1 = 'STRING  120  5 200 14 "Output Path:" "'lastpath'"'
  38. Gadget.2 = 'FILEREQ 321  5  20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
  39. Gadget.3 = 'STRING  120 20 200 14 "New Extension:" "'lastext'"'
  40. Gadget.4 = 'TEXT    120 35   1  1 "(** = current frame number)" 1'
  41. Gadget.5 = 'CHECK   120 50  26 11 "LZW Compression?"' lzw
  42. Gadget.6 = 'END'
  43.  
  44. NewComplexRequest '"Save Buffer As TIFF"' Gadget 360 68
  45. if rc ~= 0 then exit rc
  46.  
  47. call setclip(base'Path'seq, result.1)
  48. call setclip(base'Ext'seq,  result.3)
  49. call setclip(base'LZW'seq,  result.5)
  50.  
  51. exit
  52.